﻿using System;
using System.Collections.Generic;
using System.Text;

namespace StockTrader.FrontEnd.DataContract
{
    public class DailyOrderUI
    {
        private int _firmNo;
        public int FirmNo
        {
            get { return _firmNo; }
            set { _firmNo = value; }
        }
        private DateTime _transDate;
        public System.DateTime TransDate
        {
            get { return _transDate; }
            set { _transDate = value; }
        }
        private string _pcFlag;
        public string PcFlag
        {
            get { return _pcFlag; }
            set { _pcFlag = value; }
        }
        private string _orderSide;
        public string OrderSide
        {
            get { return _orderSide; }
            set { _orderSide = value; }
        }
        private string _symbol;
        public string Symbol
        {
            get { return _symbol; }
            set { _symbol = value; }
        }
        private int _volume;
        public int Volume
        {
            get { return _volume; }
            set { _volume = value; }
        }
        private int _matched;
        public int Matched
        {
            get { return _matched; }
            set { _matched = value; }
        }
        private string _price;
        public string Price
        {
            get { return _price; }
            set { _price = value; }
        }
        private int _orderTime;
        public int OrderTime
        {
            get { return _orderTime; }
            set { _orderTime = value; }
        }

        public DailyOrderUI(int firmno, DateTime transdate, string pcflag, string orderside, string symbol, int volume, int matched, int price, int ordertime)
        {
            this._firmNo = firmno;
            this._transDate = transdate;
            this._pcFlag = pcflag;
            this._orderSide = orderside;
            this._symbol = symbol;
            this._volume = volume;
            this._matched = matched;
            if (price > 0)
                this._price = price.ToString();
            else
            {
                if (ordertime <= 9000000)
                    this._price = "ATO";
                else
                    this._price = "ATC";
            }
            //this._price = price;
            this._orderTime = ordertime;
        }
    }
}
